#!/usr/bin/perl

# $Id: 22_buildcommand_loadnewcontent.t 317 2010-08-07 10:44:21Z dolbanavt $
# $Date: 2010-08-07 13:44:40 +0300 (Суб, 07 Авг 2010) $
# $HeadURL: https://robosearch.googlecode.com/svn/branches/reborn/t/22_buildcommand_loadnewcontent.t $
# $LastChangedRevision$

use FindBin qw( $RealBin );
use File::Spec::Functions qw( catfile );

BEGIN {
    push @INC, catfile( $RealBin, '..', 'base_lib' );
    push @INC, catfile( $RealBin, '..', 'lib' );
}

use JIP::ToolSet;
use English qw( -no_match_vars );
use Test::More 0.88;
use Const::Fast qw( const );

const my $MODULE => 'BuildCommand::LoadNewContent';

use_ok $MODULE;
require_ok $MODULE;

can_ok $MODULE, qw(
    new _init
    get_conf get_log get_dbh
    set_conf set_log set_dbh
    execute
    _log_step_header
    _load_content_from
);

my $o = $MODULE->new(
    conf => 'conf_object',
    log  => 'logger',
    dbh  => 'database_wrapper',
);

ok $o, 'got object';

isa_ok $o, $MODULE;
isa_ok $o, 'JIP::BaseClass';
isa_ok $o, 'Class::Accessor::Fast';

is $o->get_conf, 'conf_object',      'conf accessor';
is $o->get_log,  'logger',           'log accessor';
is $o->get_dbh,  'database_wrapper', 'dbh accessor';

done_testing();
